package com.itheima.mycharset;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;

public class CharSetDemo1 {
    public static void main(String[] args) throws UnsupportedEncodingException {

        String str = "ai你哟";
        byte[] bytes = str.getBytes();
        System.out.println(Arrays.toString(bytes));

        String s = new String(bytes);
        System.out.println(s);

        String s1 = new String(bytes,"GBK");
        System.out.println(s1);
    }
}
